/**
 * 全站权限配置
 *
 */
import router from './router/router'
import store from '@/store'
import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css' // progress bar style
NProgress.configure({ showSpinner: false })

router.beforeEach((to, from, next) => {
  // NProgress.start();
  document.title = to.name;
  next();
})

router.afterEach(() => {
  NProgress.done()
  // let title = store.getters.tag.label;
  // if (!store.getters.access_token) title = undefined;
  // router.$avueRouter.setTitle(title)
})
